import { Inject, Controller, Get } from '@midwayjs/core';
import { PhotoService } from '../service/photo.service';

@Controller('/photo')
export class PhotoController {
  @Inject()
  photoService: PhotoService;

  // GET /photo/add
  @Get('/add')
  async home() {
    // 调用 PhotoService
    const data = await this.photoService.savePhoto();

    return data;
  }

  @Get('/find')
  async find() {
    await this.photoService.findPhotos();
    return '去看控制台';
  }
}
